.chat-message {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.chat-message.user {
  align-items: flex-end;
}

.chat-message.assistant {
  align-items: flex-start;
}

.message-content {
  display: flex;
  align-items: flex-start;
  max-width: 80%;
}

.chat-message.user .message-content {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin: 0 8px;
  background: #f0f0f0;
}

.chat-message.user .message-avatar {
  background: #1890ff;
  color: white;
}

.chat-message.assistant .message-avatar {
  background: #52c41a;
  color: white;
}

.message-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-text {
  padding: 12px 16px;
  border-radius: 12px;
  word-wrap: break-word;
  line-height: 1.4;
}

.chat-message.user .message-text {
  background: #1890ff;
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.assistant .message-text {
  background: #f0f0f0;
  color: #333;
  border-bottom-left-radius: 4px;
}

.message-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  object-fit: cover;
}

.file-icon {
  padding: 8px 12px;
  background: #f0f0f0;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
}

.pdf-icon {
  background: #ff4d4f;
  color: white;
}

.message-time {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
  padding: 0 8px;
}

.chat-message.user .message-time {
  text-align: right;
}

.chat-message.assistant .message-time {
  text-align: left;
}
